x11: Ignore stray DestroyNotify events
authorMatthias Clasen <mclasen@redhat.com>
Mon, 3 Aug 2020 02:43:48 +0000 (22:43 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 3 Aug 2020 02:45:28 +0000 (22:45 -0400)
There's no use in making a delete event with a
NULL surface. Just ignore such events.

Fixes: #3006
gdk/x11/gdkdisplay-x11.c

index e895a07867f91dc280b5865f8309561776db3995..a2bcefa67dd196378207db03b8742566aed6cf7f 100644 (file)
@@ -795,7 +795,8 @@ gdk_x11_display_translate_event (GdkEventTranslator *translator,
 
       if (!is_substructure)
        {
-          event = gdk_delete_event_new (surface);
+          if (surface)
+            event = gdk_delete_event_new (surface);
 
          if (surface && GDK_SURFACE_XID (surface) != x11_screen->xroot_window)
            gdk_surface_destroy_notify (surface);